package com.bytezero.inherit3;

public class CylinderTest
{
	public static void main(String[] args) 
	{
		
		Cylinder cy = new Cylinder();
		cy.setRadius(2.2);
		cy.setLength(3.3);
		cy.findVolume();
		System.out.println("圆柱的体积为"+cy.findVolume());
		
		
		//没重写时
//	    cy.findArea();
//		System.out.println("圆柱的底面积为"+ cy.findArea());
//		
		//重写以后
	    cy.findArea();
		System.out.println("圆柱的表面积为"+ cy.findArea());

		
		System.out.println("*****************");
		Cylinder cy1 = new Cylinder();
		cy1.findVolume();
		System.out.println("圆柱的体积为"+cy1.findVolume());
		
		
		
	}
}
